package com.mes.service.cb;

import com.mes.dao.cb.MaReturnMapper;
import com.mes.entity.cb.MaReturn;
import com.mes.entity.cb.Pages;
import com.mes.entity.tdd.ProcurementChuku;
import com.mes.entity.tdd.ProcurementChukuMateriel;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: ${type_name}
 * @Description: 资材退货
 * @Author cb
 * @Date 2018年4月13日10:19:55
 * @version 1.0
 */
@Service
@Transactional
public class MaReturnServiceImpl implements MaReturnService {

    @Resource
    private MaReturnMapper maReturnMapper;

    @Override
    public List<ProcurementChuku> maReturn_listAll() {
        return maReturnMapper.maReturn_listAll();
    }

    @Override
    public List<ProcurementChukuMateriel> maReturnMa_selectByPcId(String pcId) {
        return maReturnMapper.maReturnMa_selectByPcId(pcId);
    }

    @Override
    public int maReturnMa_insert(List<MaReturn> list) {
    	int count = 0;
    	for (MaReturn pc : list) {
    		count = maReturnMapper.maReturnMa_insert(pc);
		}
    	return count;
        
    }

    @Override
    public List<ProcurementChuku> maReturn_list(Pages pages) {
        return maReturnMapper.maReturn_list(pages);
    }

    @Override
    public int maReturn_listTotal(Pages pages) {
        return maReturnMapper.maReturn_listTotal(pages);
    }

    @Override
    public List<MaReturn> maReturnMx_list(Pages pages) {
        return maReturnMapper.maReturnMx_list(pages);
    }

    @Override
    public int maReturnMx_listTotal(Pages pages) {
        return maReturnMapper.maReturnMx_listTotal(pages);
    }
}
